home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cocktail / cg.lha / cg / test-m / g.cg next >
Text File  |  1992-11-24  |  346b  |  22 lines

  1. TREE IMPORT {
  2. FROM Idents    IMPORT tIdent;
  3. TYPE  MyInt = INTEGER;
  4. }
  5.  
  6. GLOBAL {
  7. FROM Idents    IMPORT tIdent;
  8. FROM StdIO    IMPORT WriteI, WriteC;
  9. # define closeINTEGER(a)    WriteI (a, 0); WriteC (' ');
  10. }
  11.  
  12. RULE
  13.  
  14. Node    = [Mark] [Ident: tIdent] [Hex: MyInt] <
  15.   Node0    = .
  16.   Node1    = Child1: Node .
  17.   Node2    = Child1: Node Child2: Node .
  18. > .
  19. n    = <
  20.   m    = [m] .
  21. > .
  22.